<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page isELIgnored="false"%>
<%
	String path = request.getContextPath();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 
<link rel="stylesheet"
	href="<s:url value="/resources"/>/css/innerstyle.css" type="text/css" />
<link rel="stylesheet" type="text/css" media="screen"
	href="<s:url value="/resources"/>/css/custom-theme/jquery-ui.custom.min.css" />
<script type="text/javascript"
	src="<s:url value="/resources"/>/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="<s:url value="/resources"/>/js/jquery-ui.custom.min.js"></script>
<script type="text/javascript"
	src="<s:url value="/resources"/>/js/i18n/jquery.ui.datepicker-zh-CN.js"></script>
<script type="text/javascript"
	src="<s:url value="/resources"/>/js/jquery.form.js"></script>
<script type="text/javascript"
	src="<s:url value="/resources"/>/js/json2.js"></script>
<script type="text/javascript"
	src="<s:url value="/resources"/>/js/jquery.validate.min.js"></script>
<script type="text/javascript"
	src="<s:url value="/resources"/>/js/messages_zh.js"></script>
<script type="text/javascript"
	src="<s:url value="/resources"/>/js/htinfo.js"></script>

<style type="text/css">
textarea{
font-size:12px;
}
#tab {
	width: 99%;
	border: #F4F4F4 solid 4px;
	padding: 0 2px 3px 2px;
	margin: 0;
	float: left;
}

#tab h1 {
	display: block;
	width: 95%;
	height: 45px;
	float: center;
	font-size:24;
	text-align: center;
	padding-top: 5px;
}

#tab h1 span {
	width: 250px;
	font: bold 26px/55px Arial, Helvetica, sans-serif;
	color: #fff;
	background-color: #fff;
	display: block;
}

.textbox {
	width: 90px;
	border: #000 1px solid;
}

.textboxs {
	width: 70px;
	border: #000 1px solid;
}

.textboxs1 {
	width: 70px;
	border: #000 1px solid;
	background-color: #ddd;
}

.longtextbox {
	width: 180px;
	border: #000 1px solid;
}

.longtextbox1 {
	width: 180px;
	border: #000 1px solid;
	background-color: #ddd;
}

.shorttextbox {
	width: 50px;
	border: #000 1px solid;
}

.shorttextbox1 {
	width: 50px;
	border: #000 1px solid;
	background-color: #ddd;
}

.textarea {
	overflow: auto;
	border: #000 1px solid;
}

.textarea1 {
	overflow: auto;
	border: #000 1px solid;
	background-color: #ddd;
}

.select div {
	border: 1px solid #000;
	float: left;
}

label {
	display: block;
}

fieldset {
	padding: 0;
	border: 0;
	margin-top: 25px;
}

label.error {
	color: red; /*错误信息的颜色*/
}

input.error {
	border: 1px dotted red; /*输入错误的输入框的边框样式*/
}
</style>
<script type='text/javascript'>  



function changeTabForMsr(val){ 
      var url = "";     
      var dwbm = ${ydxx.maisrdwbm};
      //alert(val+" "+dwbm);     
      url = "<%=path%>/common/loadMsrdw?qiyid="+val;
      $.post(url,function(data){
    	     //var json1 = eval('(' + data + ')');
    	  // var str = "{name:'张三',age:'12',sex:'男'}"; 
    	     var json = eval('(' + data + ')');
    	    // alert(json.name);
                
            $("#cmr").val(json.maisdwmc);
            $("#zs").val(json.maisdwdz);
            $("#fddbr").val(json.maisdwjsrfddbr);
            $("#wtdlr").val(json.maisdwjsrwtdlr);
            $("#dh").val(json.maisdwjsrdh);
            $("#cz").val(json.maisdwcz);
            $("#yb").val(json.maisdwjsryzbm);
            $("#khyh").val(json.maisdwkhyh);
            $("#zh").val(json.maisdwzh);
            $("#djh").val(json.maisdwnsrdjh);
            $("#msrlx").val('3');
            });      
      
   }
    

function loadMsrJsdwData(){
            var dwbm = ${ydxx.maisrdwbm};
             var url = "<%=path%>/common/loadJsdw?qiyId="+dwbm;
               $.post(url,function(data){
                var json = eval('(' + data + ')');
                $("#cmrdwjsrbm").empty(); 
                $("#cmrdwjsrbm").append("<option value='-1'>请选择</option>");      
                  for(var i=0;i<json.length;i++){                
                  $("#cmrdwjsrbm").append("<option value='"+json[i].sysid+"'>"+json[i].mingch+"</option>");
                  }
                  if(${lx}!=1){
                  $("#cmrdwjsrbm").val(${ydxx.jsdw});
                  changeTabForJsdw(${ydxx.jsdw},'2');
                  }
               });
    } 

function loadShdwData(){
    var dwbm = ${ydxx.maisrdwbm};
    var url = "<%=path%>/common/loadFhdw?msrId="+dwbm;    
      $.post(url,function(data){ 
      var projects = eval('(' + data + ')'); 
     // var projects =[{"label":"广州珠江电力燃料有限公司","sysid":"153780"},{"label":"广州恒运企业集团股份有限公司","sysid":"71356"}];  
         //alert(projects);
       $( "#sfahdwmc").autocomplete({
			minLength:1,
			source:projects,	
            select: function( event, ui ) {
             //alert(ui.item.label);	
				$( "#sfahdwmc" ).val( ui.item.label );							
				$( "#shrid").val( ui.item.sysid );						
				return false;

			}
		});
    });
    }
 
   
    function loadTabForHtxs(){       
    var url = "";
    var projects = "";
    var vvalue="${bdxx.hetxs}";
    //alert(vvalue);
 
    loadForYinyzOrChusz(vvalue);
   }
    
    
    function loadForYinyzOrChusz(vvalue){
    url = "<%=path%>/common/loadDz";
    $.post(url,function(data){ 
        projects = eval('(' + data + ')');
        $("#fadzbm").empty(); 
        $("#fadzbm").append("<option value='-1'>请选择</option>");      
        for(var i=0;i<projects.length;i++){
        //alert(projects[i].name);
        $("#fadzbm").append("<option value='"+projects[i].sysid+"'>"+projects[i].mingch+"</option>");
        }
        $("#fadzbm").val('${ydxx.fadzbm}');
        });
    }
   
    
    function changeTabForJsdw(vvalue,dwlx){
        var url = "<%=path%>/common/changeJsdw?qiyid="+vvalue+"&qiylx="+dwlx;       
        $.post(url,function(data){
        	  var json = eval('(' + data + ')');
        if(dwlx=='1'){
            $("#szs").val(json.chumdwjsrdz);
            $("#sfddbr").val(json.chumdwjsrfddbr);
            $("#swtdlr").val(json.chumdwjsrwtdlr);
            $("#sdh").val(json.chumdwjsrdh);
            $("#scz").val(json.chumdwjsrcz);
            $("#syb").val(json.chumdwjsryzbm);
            $("#skhyh").val(json.chumdwjsrkhyh);
            $("#szh").val(json.chumdwjsrzh);
            $("#sdjh").val(json.chumdwjsrnsrdjh);
              $("#cmdwjsrmc").val( $("#chumdwjsrbm").find("option:selected").text()); 
           }else{
        	  // alert(json.chumdwjsrdz);
               $("#bzs").val(json.chumdwjsrdz);
               $("#bfddbr").val(json.chumdwjsrfddbr);
               $("#bwtdlr").val(json.chumdwjsrwtdlr);
               $("#bdh").val(json.chumdwjsrdh);
               $("#bcz").val(json.chumdwjsrcz);
               $("#byb").val(json.chumdwjsryzbm);
               $("#bkhyh").val(json.chumdwjsrkhyh);
               $("#bzh").val(json.chumdwjsrzh);
               $("#bdjh").val(json.chumdwjsrnsrdjh);
              $("#msdwjsrmc").val( $("#maisdwjsrbm").find("option:selected").text()); 
           }
        
        });       
    }
    
 
    
    function loadMsrData(dwbm){
        var url = "<%=path%>/common/loadCmrForCombox";       
        $.post(url,function(data){
            var json = eval('(' + data + ')');           
        $("#cmrbm").empty();    
        $("#cmrbm").append("<option value='-1'>==请选择==</option>");  
        for(var i=0;i<json.length;i++){
        //alert(projects[i].name);
        $("#cmrbm").append("<option value='"+json[i].id+"'>"+json[i].name+"</option>");
        }
        if(${lx}!=1){
        $("#cmrbm").val(dwbm); 
        changeTabForMsr(dwbm);
        }
        });
   }
   
    
    
    
       
    function loadFhdwData(){
       var url = "<%=path%>/htgl/findFhdwList.action";    
      $.post(url,function(data){ 
        var projects = eval('(' + data + ')'); 
        //alert(projects);
       $( "#fahdwmc").autocomplete({
			minLength:2,
			source:projects,			
            select: function( event, ui ) {
            //alert(ui.item.label);	
				$( "#fahdwmc").val( ui.item.label );							
				$( "#fahdwbm").val( ui.item.fahdwbm );						
				return false;

			}
		});
    });
    }
    
 
    $(function(){ 
    	var nf =${bdxx.nianf};
    	var myDate = new Date();
    	var yy = myDate.getFullYear();
    	var yf=myDate.getMonth()+1;
    	if(nf>yy){
    		yf=1;
    	}
    	
    	for (var i=1;i<13;i++){
    	if(i<yf){
    		  $("input[name='ygml"+i+"']").toggleClass( "shorttextbox1" ) ;
    		  $("input[name='ygml"+i+"']").attr("readonly",true);
    	}}
    	
    var dwbm =${ydxx.maisrdwbm}; 
        loadMsrData(dwbm);  
        loadTabForHtxs();    
        loadMsrJsdwData();
        loadShdwData();              
        $("#but1").button();
        $("#but2").button();
        $("#but3").button();
        $("#jsdnr").button();
        $("#jsdnr1").button();
        $("#jsdnr1").hide(); 
        
         
        if(${lx}!=1){
            $("#but1").val("保存");
            }
         
 
        $("#butydf").button();
        if(${ydxx.yingdzt}+""==11){
            $("#butydf").hide();	
        }        
        if(${ydxx.yingdzt}+""==11){
            $("#but1").hide();	
        }         
	    checkJg();
		tj();   
		jsdxxShow();  
		$("#jsdnr1").click(function(){
		jsdxxHide();		
		});
		$("#jsdnr").click(function(){
		jsdxxShow();		
		}); 
		$( document ).tooltip();
		if(${ydxx.yingdzt}==2||${ydxx.yingdr}!="${userId}")
		{
		 $("#but1").hide();
		}
    });
    
    
	
	function tj(){	
	/**  
     * 自定义验证规则——增加对select的验证  
     */  
    $.validator.addMethod(    
        "selectNone", 
        function(value, element)
        {   
            if (value == "-1") 
            {    
                return false;    
            }    
            else    
            {   
                return true;    
            }   
        },    
        "必须选择一项" 
    );   
	
	$("#form1").validate({
	       rules: {
	       sheng:{
	       selectNone:true
	       },	       
	       "yingdsl":{
	       required: true, 
	       digits:true,
	       range:[${bdxx.zxjilz},${bdxx.shul}]
	       },
	        "jsdw":{
	       selectNone:true
	       },	
		   "fadzbm":{
		       selectNone:true
		       },	
	       "yingddwid":{
		       selectNone:true
		       },
		   "ygml1":{
	       digits:true,
	       range:[0,${bdxx.gml1}]
	       },		   
		   "ygml2":{
	       digits:true,
	       range:[0,${bdxx.gml2}]
	       },		   
		   "ygml3":{
	       digits:true,
	       range:[0,${bdxx.gml3}]
	       },		   
		   "ygml4":{
	       digits:true,
	       range:[0,${bdxx.gml4}]
	       },		   
		   "ygml5":{
	       digits:true,
	       range:[0,${bdxx.gml5}]
	       },		   
		   "ygml6":{
	       digits:true,
	       range:[0,${bdxx.gml6}]
	       },		   
		   "ygml7":{
	       digits:true,
	       range:[0,${bdxx.gml7}]
	       },		   
		   "ygml8":{
	       digits:true,
	       range:[0,${bdxx.gml8}]
	       },		   
		   "ygml9":{
	       digits:true,
	       range:[0,${bdxx.gml9}]
	       },		   
		   "ygml10":{
	       digits:true,
	       range:[0,${bdxx.gml10}]
	       },		   
		   "ygml11":{
	       digits:true,
	       range:[0,${bdxx.gml11}]
	       },		   
		   "ygml12":{
	       digits:true,
	       range:[0,${bdxx.gml12}]
	       }
	       },
		   messages: {
		   sheng:"请选择省份",
	       "jsdw":"请选择买受人结算单位",
	       "yingddwid":"请选择出卖人单位",
	       "fadzbm":"请选择发站",
		   "yingdsl":{
	       required: "请输入数量", 
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入最小交易量-总量之间的数")
	       },
		   "ygml1":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "ygml2":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "ygml3":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "ygml4":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "ygml5":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "ygml6":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "ygml7":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "ygml8":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "ygml9":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "ygml10":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "ygml11":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "ygml12":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       }
		   }
		   });
		   $("#but1").click(function(){
		    if($("#form1").valid()){ 
		       var flag = true;
		       var msg = "";
		       if(document.getElementById("shrid").value==""){
		           msg ="请选择发货单位";
		           flag = false;
		        }
		         if(parseFloat(document.getElementById("shul").value)>parseFloat(document.getElementById("bdsl").value)){
		          msg ="应单数量大于报单数量,请重新填写";
		          flag = false;
		        }
		        if(parseFloat(document.getElementById("shul").value)!=parseFloat(GetYueZJ())){
		          msg ="应单总数量和分月数量不等,请重新填写";
		          flag = false;
		        }
		        if(flag){
		        var url = "<%=path%>/jjjy/saveYingd";
		         $("#form1").ajaxSubmit({
		              url:url,
		              type:'post',
		              success:function(data){
		              var json =eval('(' + data + ')');
					    if(json.result==1){
					    alert("操作成功！");
					    window.returnValue=1;
                        window.close();					   
					   }else{
					    alert("操作失败！");
					   }
		              }
		         });
		        }else{
		        alert(msg);
		        }
		        		       
		       
		        }
		       });
		   
		  		   
	 	     
	}
	

	
	function txtzjl_onblur() { 
	     if ($("#shul").val() != "") {
	     	var nf =${bdxx.nianf};
	    	var myDate = new Date();
	    	var yy = myDate.getFullYear();
	    	var yf=myDate.getMonth()+1;
	    	if(nf>yy){
	    		yf=1;
	    	}
                var zjsl = parseFloat($("#shul").val());
                var yuesl = zjsl / (13-yf);
                var intyue = parseInt(yuesl);
                var syysl = intyue * (12-yf);
                var srysl = zjsl - syysl;
                SetYueZJ(intyue, srysl);
                return;
            }
            SetYueZJ(0, 0);  
        }

        function SetYueZJ(yuesl, srysl) {
            if(yuesl==0){
            $("#shul").val(yuesl)
            }
	     	var nf =${bdxx.nianf};
	    	var myDate = new Date();
	    	var yy = myDate.getFullYear();
	    	var yf=myDate.getMonth()+1;
	    	if(nf>yy){
	    		yf=1;
	    	}
        	for (var i=1;i<13;i++)
        	{
        	if(i>=yf){
        	$("input[name='ygml"+i+"']").val(yuesl) ;
        	}}           
            $("#dec").val(srysl);            
        }  
        
     function txtyuesl_onblur() {
            if (!event.srcElement.value) {
                event.srcElement.value = '0'
            }
            var temp = GetYueZJ();
            if (isNaN(temp)) {
                $("#shul").val(0);                
            }
            else {
                $("#shul").val(temp);                
            }

        }

        function GetYueZJ() { 
             var yue1 =parseFloat($("#jan").val()==''?0:$("#jan").val());            
            var yue2 = parseFloat($("#feb").val()==''?0:$("#feb").val());
            var yue3 = parseFloat($("#mar").val()==''?0:$("#mar").val());
            var yue4 = parseFloat($("#apr").val()==''?0:$("#apr").val());
            var yue5 = parseFloat($("#may").val()==''?0:$("#may").val());
            var yue6 = parseFloat($("#jun").val()==''?0:$("#jun").val());
            var yue7 = parseFloat($("#jul").val()==''?0:$("#jul").val());
            var yue8 = parseFloat($("#aug").val()==''?0:$("#aug").val());
            var yue9 = parseFloat($("#sep").val()==''?0:$("#sep").val());
            var yue10 = parseFloat($("#oct").val()==''?0:$("#oct").val());
            var yue11 = parseFloat($("#nov").val()==''?0:$("#nov").val());
            var yue12 = parseFloat($("#dec").val()==''?0:$("#dec").val()); 

            var yuezj = yue1 + yue2 + yue3 + yue4 + yue5 + yue6 + yue7 + yue8 + yue9 + yue10 + yue11 + yue12;
            return yuezj;
        }
     
     function jsdxxHide(){
     $("#jsdnr1").hide();
     $("#jsdnr").show();
        $.each($("#bjsdnr tr"), function(i){     
         if(i > 0){        
           this.style.display = 'none';    
          }   
        }); 
        $.each($("#bjsdnr1 tr"), function(i){     
         if(i > 0){        
           this.style.display = 'none';    
          }   
        }); 
        $.each($("#sjsdnr tr"), function(i){     
         if(i > 0){        
           this.style.display = 'none';    
          }   
        }); 
        $.each($("#sjsdnr1 tr"), function(i){     
         if(i > 0){        
           this.style.display = 'none';    
          }   
        });   
     }  
     
     function jsdxxShow(){
     $("#jsdnr").hide();
     $("#jsdnr1").show();
     $.each($("#bjsdnr tr"), function(i){     
         if(i > 0){        
           this.style.display = '';    
         }   
       });
     $.each($("#sjsdnr tr"), function(i){     
         if(i > 0){        
           this.style.display = '';    
         }   
       }); 
       $.each($("#bjsdnr1 tr"), function(i){     
         if(i > 0){        
           this.style.display = '';    
         }   
       });
     $.each($("#sjsdnr1 tr"), function(i){     
         if(i > 0){        
           this.style.display = '';    
         }   
       });
     } 
	
	function checkJg(){
	var jig = "${bdxx.danj}";
	//alert(jig);
	var jiglx ="${bdxx.jiaglxname}";
	var neir =$("#neir2").text();
	var str = "";
	if(jiglx!='' && jiglx!=null){
	    str+=jiglx+":";
	}
	if(jig!='' && jig!=null){
	    str+=jig+"元/吨,"	;
	}
	$("#neir2").text(str+neir);
	}
	</script>

</head>

<body>

	<div id="tab">
		<h1>招 标 报 名</h1>

		<form name="form1" id="form1">
			<table id="list_search" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td>出卖人（销方）:<span style="color: red;font-size:16px;vertical-align:middle;">*</span></td>
					<td>	      
						<div class="select">
							<div>
								<select id="cmrbm" name="yingddwid" style="width:180px;"
									onChange="changeTabForMsr(this.value)">
								</select>

						<input id="yingdbh" type="hidden" name="yingdbh" value="${ydxx.yingdbh}" />
						<input type="hidden" id="yingdsj" name="yingdsj" value="${ydxx.yingdsj}">
						<input type="hidden" id="sysid" name="sysid" value="${ydxx.sysid}">		
						<input type="hidden" id="yingdzt" name="yingdzt" value="${ydxx.yingdzt}">						
							</div>
						</div> </td>
	                <td>煤炭用途:</td>
					<td><input type="text" class="longtextbox1"
						value="${bdxx.meitytmc}" readonly /></td>
						<td>交收方式:</td>
					<td><input id="" type="text" class="longtextbox1"
						value="${bdxx.jiaosfsmc}" readonly /></td>
				</tr>

				<tr>
					<td>买受人（购方）:</td>
					<td><input type="text" class="longtextbox1"
						value="${bdxx.baodrdwmc}" readonly /></td>
					<td>价格类型:</td>
					<td><input id="datepicker" type="text" class="longtextbox1"
						value="${bdxx.jiaglxmc}" readonly />
					</td>
					<td>交收地点:</td>
					<td><input id="" type="text" class="longtextbox1"
						value="${bdxx.jiaosdd}" readonly /></td> 
				</tr>

				<tr>
				    <td>发货单位:<span style="color: red;font-size:16px;vertical-align:middle;">*</span></td>
					<td><input id="sfahdwmc" name="yingddw" type="text" class="longtextbox" value= "${ydxx.yingddw}"/>     
				    <input id="shrid" type="hidden" name="sfahdw" value="${ydxx.sfahdw}" />   </td>
					<td>隶属行业:</td>
					<td><input type="text" class="longtextbox1"
						value="${bdxx.lismc}" readonly /></td>
					<td>产地:</td>
					<td><input type="text" class="longtextbox1"
						value="${bdxx.yuancd}" readonly /></td>
					
				</tr>
				<tr>
				    <td>流 向:</td>
					<td><input type="text" class="longtextbox1"
						value="${bdxx.liux}" readonly /></td>
					<td>专用线:</td>
					<td><input type="text" class="longtextbox" name="zhuanyx"
						value="${ydxx.zhuanyx}"   /></td>
					<td>最少交易方式:</td>
					<td><input id="" type="text" class="longtextbox1"
						value="${bdxx.zxjil}" readonly /></td>
				</tr>
			
							
				<tr>
					<td colspan="6" style="padding-top:5px;">一、收货人名称、品种规格、交（提）货时间、数量
					</td>
				</tr>
				<tr>
					<td colspan="6" style="padding:1px;">
						<table id="changdi" align="center" cellpadding="0" cellspacing="0"
							class="content_gridview">
							<thead>
								<tr>
									<th rowspan="3">收货人名称
									</th>
									<th rowspan="3">发站<span
										style="color: red;font-size:16px;vertical-align:middle;">*</span></th>
									<th rowspan="3">到站</th>									
									<th rowspan="3">品种规格</th>
									<th rowspan="3">质量指标</th>
									<th rowspan="3">价格<br>(元/吨)</th>
									<th colspan="13">交（提）货时间、煤量（吨）<span
										style="color: red;font-size:16px;vertical-align:middle;">*</span>
									</th>
								</tr>
								<tr>
									<th rowspan="2">全年合计<span
										style="color: red;font-size:16px;vertical-align:middle;">*</span><br>
										<a href="#" onClick="txtzjl_onblur();"
										style="text-decoration:none;cursor: hand"><img
											src="<s:url value="/resources"/>/images/pinf.gif" border=0 alt="平分"
											align="absmiddle" height="18" width="18"> </a>&nbsp;&nbsp;<a
										href="#" onClick="SetYueZJ(0,0);"
										style="border:0px;text-decoration:none;cursor: hand"><img
											src="<s:url value="/resources"/>/images/qinl.gif" border=0 alt="清零"
											align="absmiddle" height="18" width="18"> </a>
									</th>
									<th colspan="3">一季度</th>
									<th colspan="3">二季度</th>
									<th colspan="3">三季度</th>
									<th colspan="3">四季度</th>
								</tr>
								<tr>
									<th>1</th>
									<th>2</th>
									<th>3</th>
									<th>4</th>
									<th>5</th>
									<th>6</th>
									<th>7</th>
									<th>8</th>
									<th>9</th>
									<th>10</th>
									<th>11</th>
									<th>12</th>
								</tr>
							</thead>
							<tbody>
								<tr> 
									<td rowspan="2"><textarea id="shr" cols="15" rows="3"
											class="textarea1">${bdxx.sfhdwmc}</textarea> </td>
									<td rowspan="2"><div class="select"><div>
				            	    <select id="fadzbm" name="fadzbm" style="width:80px;"></select>            	
				            	    </div></div></td>
                                    <td rowspan="2"><textarea cols="12" rows="3"
											class="textarea1" readonly>${bdxx.fadzmc}</textarea></td>											
									<td rowspan="2"><textarea cols="12" rows="3"
											class="textarea1" readonly>${bdxx.pinzgg}</textarea></td>
									<td rowspan="2"><textarea cols="30" rows="3"
											class="textarea1" readonly>${bdxx.zhilzb}</textarea></td>
									<td rowspan="2"><textarea cols="10" rows="3"
											class="textarea1" readonly>${bdxx.danj}</textarea>
									</td>
									<td><input id="bdsl" type="text" class="textboxs1"
										value="${bdxx.shul}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.gml1}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.gml2}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.gml3}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.gml4}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.gml5}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.gml6}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.gml7}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.gml8}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.gml9}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.gml10}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.gml11}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.gml12}" readonly>
									</td>
								</tr>
								<tr>
									<td><input id="shul" type="text" class="textboxs"
										name="yingdsl"
										value="<fmt:formatNumber value="${ydxx.yingdsl}" pattern="###"/>">
									</td>
									<td><input id="jan" type="text" class="shorttextbox"
										name="ygml1" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.ygml1}" pattern="###"/>">
									</td>
									<td><input id="feb" type="text" class="shorttextbox"
										name="ygml2" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.ygml2}" pattern="###"/>">
									</td>
									<td><input id="mar" type="text" class="shorttextbox"
										name="ygml3" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.ygml3}" pattern="###"/>">
									</td>
									<td><input id="apr" type="text" class="shorttextbox"
										name="ygml4" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.ygml4}" pattern="###"/>">
									</td>
									<td><input id="may" type="text" class="shorttextbox"
										name="ygml5" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.ygml5}" pattern="###"/>">
									</td>
									<td><input id="jun" type="text" class="shorttextbox"
										name="ygml6" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.ygml6}" pattern="###"/>">
									</td>
									<td><input id="jul" type="text" class="shorttextbox"
										name="ygml7" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.ygml7}" pattern="###"/>">
									</td>
									<td><input id="aug" type="text" class="shorttextbox"
										name="ygml8" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.ygml8}" pattern="###"/>">
									</td>
									<td><input id="sep" type="text" class="shorttextbox"
										name="ygml9" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.ygml9}" pattern="###"/>">
									</td>
									<td><input id="oct" type="text" class="shorttextbox"
										name="ygml10" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.ygml10}" pattern="###"/>">
									</td>
									<td><input id="nov" type="text" class="shorttextbox"
										name="ygml11" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.ygml11}" pattern="###"/>">
									</td>
									<td><input id="dec" type="text" class="shorttextbox"
										name="ygml12" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.ygml12}" pattern="###"/>">
									</td>

								</tr>

							</tbody>
						</table>
					</td>
				</tr>

				<tr style="line-height:26px;">
					<td colspan="6">
						<table id="djtk" cellpadding="0" cellspacing="0" border rules=rows
							frame=below class="content">
						<c:forEach var="tk" items="${mrhttk}">
								<tr>
									<td>${tk.xh}${tk.biaot}</td>
									<td style="width:86%"><div id="neir${tk.xh}">${tk.neir}</div>
									</td>
								</tr>
							</c:forEach>	
								<tr>
									<td>备注</td>
									<td style="width:86%"><div  >${bdxx.beiz}</div>
									</td>
								</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="6">
				 <table  cellpadding="0" cellspacing="0" style="width:100%" class="content_gridview" border="1">
        <thead>        
            <tr>                
                <th colspan="2">出卖人(销方)</th>
                <th colspan="2">买受人（购方）</th>                
            </tr>
        </thead>
        <tbody>
            <tr>
                <td><table id="bjsdnr" cellpadding="0" cellspacing="0" border="0" class="content1" >
                  <tr>
                    <td> 出卖人名称： </td>
                    <td><input name="text2" type="text"  class="longtextbox"  id="cmr" value="${jydw.qiyjc}" readonly/>
                    </td>
                  </tr>
                  <tr>
                    <td> 住 所: </td>
                    <td><input name="text2" type="text" class="longtextbox" id="zs" value="${jydw.tongxdz}" readonly/>
                    </td>
                  </tr>
                  <tr>
                    <td> 法定代表人: </td>
                    <td><input name="text2" type="text" class="longtextbox" id="fddbr" value="${jydw.faddbr}" readonly/>
                    </td>
                  </tr>
                  <tr>
                    <td> 委托代理人: </td>
                    <td><input name="text2" type="text" class="longtextbox" id="wtdlr" value="${jydw.lianxr}" readonly/>
                    </td>
                  </tr>
                  <tr>
                    <td> 电 话: </td>
                    <td><input name="text2" type="text" class="longtextbox" id="dh" value="${jydw.lianxrdh}" readonly/>
                    </td>
                  </tr>
                  <tr>
                    <td> 传真: </td>
                    <td><input name="text2" type="text" class="longtextbox" id="cz" value="${jydw.qiycz}"  readonly/>
                    </td>
                  </tr>
                  <tr>
                    <td> 邮政编码: </td>
                    <td><input name="text2" type="text" class="longtextbox" id="yb" value="${jydw.qiyyb}" readonly/>
                    </td>
                  </tr>
                  <tr>
                    <td> 开户银行: </td>
                    <td><input name="text2" type="text" class="longtextbox" id="khyh" value="${jydw.kaihyhjbhname}"  readonly/>
                    </td>
                  </tr>
                  <tr>
                    <td> 帐号: </td>
                    <td><input name="text2" type="text" class="longtextbox" id="zh" value="${jydw.yinghzhjbh}"  readonly/>
                    </td>
                  </tr>
                  <tr>
                    <td> 纳税人登记号: </td>
                    <td><input name="text2" type="text" class="longtextbox" id="djh" value="${jydw.shuiwdjzhgs}" readonly/>
                    </td>
                  </tr>
                  <input type="hidden" id="csrlx" name="yinddwlx" value="1">
                </table></td>
                <td><table id="bjsdnr1" cellpadding="0" cellspacing="0" border="0" class="content1" >
                  <tr>
                    <td> 出卖人结算单位名称：<span style="color: red;font-size:16px;vertical-align:middle;">*</span> </td>
                    <td><div class="select">
                      <div>
                          <select style="width:180px;" id="cmrdwjsrbm" name="jsdw" style="width:180px;" onchange="changeTabForJsdw(this.value,'2')" ></select>
                        
                        </div>
                    </div></td>
                  </tr>
                  <tr>
                    <td> 住 所: </td>
                    <td><input name="text4" type="text" class="longtextbox" id="bzs" />
                    </td>
                  </tr>
                  <tr>
                    <td> 法定代表人: </td>
                    <td><input name="text4" type="text" class="longtextbox" id="bfddbr" />
                    </td>
                  </tr>
                  <tr>
                    <td> 委托代理人: </td>
                    <td><input name="text4" type="text" class="longtextbox" id="bwtdlr" />
                    </td>
                  </tr>
                  <tr>
                    <td> 电 话: </td>
                    <td><input name="text4" type="text" class="longtextbox" id="bdh" />
                    </td>
                  </tr>
                  <tr>
                    <td> 传真: </td>
                    <td><input name="text4" type="text" class="longtextbox" id="bcz" />
                    </td>
                  </tr>
                  <tr>
                    <td> 邮政编码: </td>
                    <td><input name="text4" type="text" class="longtextbox" id="byb" />
                    </td>
                  </tr>
                  <tr>
                    <td> 开户银行: </td>
                    <td><input name="text4" type="text" class="longtextbox" id="bkhyh" />
                    </td>
                  </tr>
                  <tr>
                    <td> 帐号: </td>
                    <td><input name="text4" type="text" class="longtextbox" id="bzh" />
                    </td>
                  </tr>
                  <tr>
                    <td> 纳税人登记号: </td>
                    <td><input name="text4" type="text" class="longtextbox" id="bdjh" />
                    </td>
                  </tr>
                </table></td>
                <td><table id="sjsdnr" cellpadding="0" cellspacing="0" border="0" class="content1" >
                  <tr>
                    <td> 买受人名称： </td>
                    <td><input name="text3" type="text" class="longtextbox1" value="${bdxx.baodrdwmc}" readonly="readonly"/>
                    </td>
                  </tr>
                  <tr>
                    <td> 住 所: </td>
                    <td><input name="text22" type="text" class="longtextbox1" value="${bdxx.tongxdz}" readonly="readonly"/>
                    </td>
                  </tr>
                  <tr>
                    <td> 法定代表人: </td>
                    <td><input name="text22" type="text" class="longtextbox1" value="${bdxx.faddbr}" readonly="readonly"/>
                    </td>
                  </tr>
                  <tr>
                    <td> 委托代理人: </td>
                    <td><input name="text22" type="text" class="longtextbox1" value="${bdxx.weitdlr}" readonly="readonly"/>
                    </td>
                  </tr>
                  <tr>
                    <td> 电 话: </td>
                    <td><input name="text22" type="text" class="longtextbox1" value="${bdxx.dianh}" readonly="readonly"/>
                    </td>
                  </tr>
                  <tr>
                    <td> 传真: </td>
                    <td><input name="text22" type="text" class="longtextbox1" value="${bdxx.chuanz}" readonly="readonly"/>
                    </td>
                  </tr>
                  <tr>
                    <td> 邮政编码: </td>
                    <td><input name="text22" type="text" class="longtextbox1" value="${bdxx.youzbm}" readonly="readonly"/>
                    </td>
                  </tr>
                  <tr>
                    <td> 开户银行: </td>
                    <td><input name="text22" type="text" class="longtextbox1" value="${bdxx.kaihyh}" readonly="readonly"/>
                    </td>
                  </tr>
                  <tr>
                    <td> 帐号: </td>
                    <td><input name="text22" type="text" class="longtextbox1" value="${bdxx.yinhzh}" readonly="readonly"/>
                    </td>
                  </tr>
                  <tr>
                    <td> 纳税人登记号: </td>
                    <td><input name="text22" type="text" class="longtextbox1" value="${bdxx.nasrdjh}" readonly="readonly"/>
                    </td>
                  </tr>
                </table></td>
                <td><table id="sjsdnr1" cellpadding="0" cellspacing="0" border="0" class="content1" >
                  <tr>
                    <td> 买受人结算单位名称： </td>
                    <td><input name="text5"  type="text" class="longtextbox1" value="${bdxx.jiesdwmc}" readonly="readonly"/>
                    </td>
                    <td valign="top"><br /></td>
                  </tr>
                  <tr>
                    <td> 住 所: </td>
                    <td><input name="text23" type="text"  class="longtextbox1" value="${bdxx.jiesdwzs}" readonly="readonly"/>
                    </td>
                    <td valign="top"><br /></td>
                  </tr>
                  <tr>
                    <td> 法定代表人: </td>
                    <td><input name="text23" type="text" class="longtextbox1" value="${bdxx.jsfaddbr}" readonly="readonly"/>
                    </td>
                    <td valign="top"><br /></td>
                  </tr>
                  <tr>
                    <td> 委托代理人: </td>
                    <td><input name="text23" type="text" class="longtextbox1" value="${bdxx.weitdlr}" readonly="readonly"/>
                    </td>
                    <td valign="top"><br /></td>
                  </tr>
                  <tr>
                    <td> 电 话: </td>
                    <td><input name="text23" type="text" class="longtextbox1" value="${bdxx.dianh}" readonly="readonly"/>
                    </td>
                    <td valign="top"><br /></td>
                  </tr>
                  <tr>
                    <td> 传真: </td>
                    <td><input name="text23" type="text" class="longtextbox1" value="${bdxx.chuanz}" readonly="readonly"/>
                    </td>
                    <td valign="top"><br /></td>
                  </tr>
                  <tr>
                    <td> 邮政编码: </td>
                    <td><input name="text23" type="text" class="longtextbox1" value="${bdxx.youzbm}" readonly="readonly"/>
                    </td>
                    <td valign="top"><br /></td>
                  </tr>
                  <tr>
                    <td> 开户银行: </td>
                    <td><input name="text23" type="text" class="longtextbox1" value="${bdxx.kaihyh}" readonly="readonly"/>
                    </td>
                    <td valign="top"><br /></td>
                  </tr>
                  <tr>
                    <td> 帐号: </td>
                    <td><input name="text23" type="text" class="longtextbox1" value="${bdxx.yinhzh}" readonly="readonly"/>
                    </td>
                    <td valign="top"><br /></td>
                  </tr>
                  <tr>
                    <td> 纳税人登记号: </td>
                    <td><input name="text23" type="text" class="longtextbox1" value="${bdxx.nasrdjh}" readonly="readonly"/>
                    </td>
                    <td valign="top"><br /></td>
                  </tr>
                </table></td>
            </tr>
        </tbody>
    </table>
					</td>

				</tr>
				<tr>
					<td colspan="4"><font size="2" color="#FF0000"><br>
					</font>
					</td>
					<td colspan="2" align="right"><font size="2">有效期：<input
							id="kssj" type="text" class="textbox" value="${bdxx.kaissj}"
							readonly /> 至<input id="jssj" type="text" class="textbox"
							value="${bdxx.jiessj}" readonly /> </font>
					</td>

				</tr>
 				
				<tr>
					<td colspan="6" align="center"><input type="button"
						id="jsdnr1" value="隐藏"> <input type="button" id="jsdnr"
						value="展开">&nbsp;&nbsp;&nbsp;  <input id="but1"
						type="button" name="" value="报名" />&nbsp;&nbsp;&nbsp;  <input
						id="but3" type="button" name="" value="关闭"
						onClick="window.returnValue=1;window.close();" /><a id="reload" href="bdxgInfo?bdbh=${bd.baodbh}&yingdbh=${ydxx.yingdbh}" style="display:none"></a>
					</td>
				</tr>
			</table>
			<input type="hidden" id="baodbh" name="baodbh" value="${bdxx.baodbh}">
		</form>
	</div>

	<div id="dialog-confirm" title="是否确认提交？"></div>

</body>
</html>

